package com.tzbank.wisdom.controller;

import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.tzbank.wisdom.service.SaveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;


/**
 * 储蓄控制器
 *
 */
@Api(tags={"储蓄控制器"})
@RequestMapping("save")
@RestController
public class SaveController {
    
	@Autowired
    private SaveService saveService;
	
	/**
	 * 储蓄活转定
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/currentTofd")
    @ApiOperation(value = "储蓄活转定", notes = "储蓄活转定接口")
    public Map<String,Object> currentToFDTransfer(@RequestBody Map<String,String> reqBody) {
    	return saveService.currentToFDTransfer(reqBody);
    }
    

	/**
	 * 储蓄 查询活期账户列表和余额
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/getAcctList")
    @ApiOperation(value = "查询活期账户列表和余额", notes = "查询活期账户列表和余额接口")
    public Map<String,Object> getAcctList(@RequestBody Map<String,String> reqBody) {
    	return saveService.getAcctList(reqBody);
    }
    

	/**
	 *  储蓄 -客户其下定期产品的列表
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/getFixProductList")
    @ApiOperation(value = "客户其下定期产品的列表", notes = "客户其下定期产品的列表接口")
    public Map<String,Object> getFixProductList(@RequestBody Map<String,String> reqBody) {
    	return saveService.getFixProductList(reqBody);
    	
    }
    

	/**
	 * 储蓄-利息计算
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/getInterest")
    @ApiOperation(value = "利息计算", notes = "利息计算接口")
    public Map<String,Object> getInterest(@RequestBody Map<String,String> reqBody) {
    	return saveService.getInterest(reqBody);
    }
    

	/**
	 * 储蓄查询利率
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/getRate")
    @ApiOperation(value = "查询利率", notes = "查询利率接口")
    public Map<String,Object> getRate(@RequestBody Map<String,String> reqBody) {
    	return saveService.getRate(reqBody);
    }
    
    /**
	 * 储蓄定转活
	 * @param 
	 * @return
	 */
    @ResponseBody
    @PostMapping(value="/fixToCurrent")
    @ApiOperation(value = "定转活", notes = "定转活接口")
    public Map<String,Object> fixToCurrent(@RequestBody Map<String,String> reqBody) {
    	return saveService.fixToCurrent(reqBody);
    }
    
	/**
	 * 储蓄智多薪签约
	 * @param 
	 * @return
	 */
     @ResponseBody
     @PostMapping(value="/signzdx")
     @ApiOperation(value = "储蓄智多薪签约", notes = "储蓄智多薪签约接口")
     public Map<String,Object> signzdx(@RequestBody Map<String,String> reqBody) {
   	  return saveService.signzdx(reqBody);
     }
          
	
    /**
	* 储蓄智多薪账号查询
	* @param 
	* @return
	*/
    @ResponseBody
    @PostMapping(value="/queryZdxCard")
    @ApiOperation(value = "储蓄智多薪账号查询", notes = "储蓄智多薪账号查询接口")
    public Map<String,Object> queryZdxCard(@RequestBody Map<String,String> reqBody) {
 	   return saveService.queryZdxCard(reqBody);
    }
    
    /**
	* 储蓄智多薪签约查询
	* @param 
	* @return
	*/
    @ResponseBody
    @PostMapping(value="/queryZdxSign")
    @ApiOperation(value = "储蓄智多薪签约查询", notes = "储蓄智多薪签约查询接口")
    public Map<String,Object> queryZdxSign(@RequestBody Map<String,String> reqBody) {
 	   return saveService.queryZdxSign(reqBody);
    }
    
    /**
   	* 储蓄借记卡列表查询
   	* @param 
   	* @return
   	*/
   @ResponseBody
   @PostMapping(value="/querySaveCard")
   @ApiOperation(value = "借记卡列表查询", notes = "借记卡列表查询接口")
   public Map<String,Object> querySaveCard(@RequestBody Map<String,String> reqBody) {
	   return saveService.querySaveCard(reqBody);
   }
}
